//Detect and solve problems of following program:
//void main()
//{
//	int a[4] = {1, 2, 3, 4};
//	int *p = a;
//	int *p2 = new int;
//	delete p;
//	delete a;
//	delete p2;
//}

// p va a chua cap phap ma da huy cap phap sinh ra loi runtime.
#include <iostream>

using namespace std;

int main()
{
	int a[4] = {1, 2, 3, 4};
	int *p = a;
	int *p2 = new int;
	delete p2;
	
	system("pause");
}